﻿<%@ Page Language="C#" MasterPageFile="~/masterpages/default.master" AutoEventWireup="true" CodeFile="messages.aspx.cs" Inherits="VISS.Web.Frontend.Modules.User.Profile.MessagesPage" Title="" %>

<%@ Register Src="~/modules/user/profiles/controls/messageList.ascx" TagName="messagesList" TagPrefix="viss" %>

<%@ Import Namespace="VISS.Web.Frontend.Modules.User.Profile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="idHeadPlaceHolder" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="idContainerPlaceHolder" Runat="Server">
    <div id="message-page">
        <div class="header">
            <div class="left">Hiển thị:</div>
            <% if (ViewType ==EMessageViewType.UnRead) { %>
                <div id="Read" class="all unclick" onclick="window.location='/profile/messages?viewtype=all'">Tất cả</div>
                <div id="Unread" class="unread clicked unread-clicked" >Chưa đọc</div>                
                <input type="hidden" value="unread" id="ViewType" />
            <% } else { %>
                <div id="Read" class="all clicked all-clicked" >Tất cả</div>
                <div id="Unread" class="unread unclick" onclick="window.location='/profile/messages?viewtype=unread'" >Chưa đọc</div>                
                <input type="hidden" value="all" id="ViewType" />
            <% } %>
        </div>
        <% if (TotalMessage > 0) { %>
            <viss:messagesList ID="idMessagesList" runat="server" EnableViewState="false" />
        <% } else { %>
            <div class="empty-page">Bạn không có tin nhắn 
            <% if (ViewType == EMessageViewType.UnRead) {
                   Response.Write("mới");
               } %> nào
            </div>
        <% } %>
        <div class="footer">
            <div class="left"><strong><%=TotalMessage %></strong> tin nhắn
            <% if (ViewType == EMessageViewType.UnRead) {
                   Response.Write("mới");
               } %>
            </div>
            <div class="right"><%=Paging %></div>
        </div>
    </div>
    <input type="hidden" value="<%=CurrentPage %>" id="Page" />
</asp:Content>

